package dlg.code.producer.s2;

import dlg.code.producer.ItemBuffer;

public class ItemBufferTest {
    public static void main(String[] args) {
        ItemBuffer itemBuffer = new ItemBuffer(10);
        Thread p1 = new Thread(new ProducerThread(itemBuffer), "p1");
        Thread p2 = new Thread(new ProducerThread(itemBuffer), "p2");
        Thread c1 = new Thread(new TakeThread(itemBuffer), "c1");
        Thread c2 = new Thread(new TakeThread(itemBuffer), "c2");
        Thread c3 = new Thread(new TakeThread(itemBuffer), "c3");

        p1.start();
        p2.start();

        c1.start();
        c2.start();
        c3.start();
    }
}
